#pragma once
#ifndef __STATE_MANAGEMENT_H__
#define __STATE_MANAGEMENT_H__

#include <stack>
#include "MainMenuState.h"
#include "InGameState.h"

using namespace std;

class StateManagement
{
public:
	StateManagement(void);
	virtual ~StateManagement(void);

	static StateManagement* GetInstance()
	{
		if(!s_pStateManager) 
		{
			s_pStateManager = new StateManagement();
		}
		return s_pStateManager;
	}

	void SwitchState(IState* state);
	void PushState(IState* state);	
	void PopState();

	void Init();
	void Update(float dt);
	void Render();
	void Release();	

protected:
	static StateManagement* s_pStateManager;
private:	
	stack<IState*> m_apStates;
};

#endif